<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core">
<h:head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    
    <h:outputStylesheet library="css" name="style.css" />
    <h:outputStylesheet library="css" name="layout.css" />
    
    <title><ui:insert name="title">HidroData</ui:insert></title>
    
    <script type="text/javascript">
    var HidroData = HidroData || {};

    HidroData.contextPath = "#{facesContext.externalContext.requestContextPath}";
    </script>
</h:head>

								  
<link href='#{request.contextPath}/resources/img/logo-icon.ico' rel='shortcut icon'/>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-29923493-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<h:body>

	<p:hotkey handler="modalCadastro.hide()" bind="esc" />

    <p:ajaxStatus id="ajaxStatus" styleClass="ajaxStatus">
        <f:facet name="start">
            <h:outputText value="#{messages['ajax.status']}" styleClass="ajaxStatusStart" />
        </f:facet>
        <f:facet name="complete">
            <h:outputText value="" />
        </f:facet>
    </p:ajaxStatus>

    <div class="container">
        <div class="topbar">
            <h:outputText value="#{messages['topbar.efetuarLogin']}" rendered="#{!identity.loggedIn}" />
            
            <h:panelGroup rendered="#{identity.loggedIn}">
                <h:form id="formUserInfo">
                    <h:outputFormat value="#{messages['topbar.bemVindo']}">
                        <f:param value="#{identity.user.name}" />
                    </h:outputFormat>
                    <h:commandLink id="logout" action="#{identity.logout()}" value="#{messages['login.logout']}" />
                </h:form>
            </h:panelGroup>
        </div>
        
        <div class="wrap">
	        <div class="header">
	            <h:form id="formHeader">
	                <h:commandLink action="principal">
	                     <h:graphicImage library="img" name="logo.png" width="400" />
	                </h:commandLink>
	            </h:form>
	        </div>
	        
	        <div class="body clearfix">
	            <h:panelGroup styleClass="navigation" layout="block" rendered="#{identity.loggedIn}">
	                <p:menu type="tiered">
	                    <p:menuitem value="#{messages['menu.paginaInicial']}" url="/" />
	                    <!-- <p:menuitem value="#{messages['menu.curvasReferencia']}" url="/graficos/index.html" />   -->
	                    
	                    <p:separator />
	                    
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.amostras']}" url="/amostras" />
	                    <p:menuitem value="#{messages['menu.pontosColeta']}" url="/pontosColeta" />
	                    
	                    <p:separator rendered="#{restrictions.consulta}" />
	                    
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.baciasHidrograficas']}" url="/bacias" />
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.corposHidricos']}" url="/corpos-hidricos" />
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.cidades']}" url="/cidades" />
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.condicoesClimaticas']}" url="/condicoes-climaticas" />
	                    
	                    <p:separator rendered="#{restrictions.consulta}" />
	                    
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.indiceQualidadeAgua']}" url="/indice-qualidade-agua" />
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.parametros']}" url="/parametros" />
	                    <p:menuitem rendered="#{restrictions.consulta}" value="#{messages['menu.riosBlumenau']}" url="/rios-blumenau" />
	
	                    <p:separator rendered="#{restrictions.admin}" />
	
	                    <p:menuitem  rendered="#{restrictions.admin}" value="#{messages['menu.usuarios']}" url="/usuarios" />
	                </p:menu>
	                
		            <h:panelGroup class="banners">
	                	<h:outputLink value="http://www.sc.senai.br" target="_blank">
		                	<h:graphicImage library="img" name="banner-senai.png" />
	                	</h:outputLink>
	                	
	                	<h:outputLink value="http://www.fozdobrasil.com.br/fozwp/blumenau/" target="_blank">
		                	<h:graphicImage library="img" name="banner-foz.jpg" />
	                	</h:outputLink>
		            </h:panelGroup>
		            
	            </h:panelGroup>
	            
	            
	            <div class="content">
	                <ui:insert />
	            </div>
	            
	            <div class="clear"></div>
	        </div>
        </div>
        
        <div class="footer">
        
			<strong>SENAI - Serviço Nacional de Aprendizagem Industrial
			<br/>Consultoria em Processo Produtivo - Gestão de Águas e Efluentes
			<br/>NDS - Núcleo de Desenvolvimento de Software</strong>
			<br/>Rua São Paulo, 1147, Victor Konder
			<br/>Blumenau, Santa Catarina, Brasil <h:outputLink value="http://maps.google.com.br/maps?q=senai+blumenau&amp;hl=pt-BR&amp;view=map&amp;cid=6740964022531375743&amp;t=w&amp;z=17&amp;iwloc=A" target="_blank">ver mapa</h:outputLink>
			<br/>Fone: 047 3321-9682 <h:outputLink value="mailto:kleitons@sc.senai.br">email</h:outputLink>        
        </div>
    </div>
</h:body>
</html>